// src/stores/contexts/StoreContextProvider.tsx
import React, { FC, ReactNode } from 'react';
import { StoreContext } from './StoreContext';
import { initializeStore } from '..';

interface StoreProviderProps {
  children: ReactNode;
}

// 创建存储实例
const store = initializeStore();

export const StoreProvider: FC<StoreProviderProps> = ({ children }) => {
  return (
    <StoreContext.Provider value={store}>
      {children}
    </StoreContext.Provider>
  );
};